(*
 * TWinDynDriverCallbacks type, it's a function/procedure point map.
 *)
type
  PWinDynDriverCallbacks = ^TWinDynDriverCallbacks;
  TWinDynDriverCallbacks = record
    null_func                    : pointer;
    driver_failure_atom          : pointer;
    driver_failure_posix         : pointer;
    driver_failure               : pointer;
    driver_exit                  : pointer;
    driver_failure_eof           : pointer;
    driver_select                : pointer;
    driver_event                 : pointer;
    driver_output                : pointer;
    driver_output2               : pointer;
    driver_output_binary         : pointer;
    driver_outputv               : pointer;
    driver_vec_to_buf            : pointer;
    driver_set_timer             : pointer;
    driver_cancel_timer          : pointer;
    driver_read_timer            : pointer;
    erl_errno_id                 : pointer;
    set_busy_port                : pointer;
    set_port_control_flags       : pointer;
    get_port_flags               : pointer;
    driver_alloc_binary          : pointer;
    driver_realloc_binary        : pointer;
    driver_free_binary           : pointer;
    driver_alloc                 : pointer;
    driver_realloc               : pointer;
    driver_free                  : pointer;
    driver_enq                   : pointer;
    driver_pushq                 : pointer;
    driver_deq                   : pointer;
    driver_sizeq                 : pointer;
    driver_enq_bin               : pointer;
    driver_pushq_bin             : pointer;
    driver_peekqv                : pointer;
    driver_peekq                 : pointer;
    driver_enqv                  : pointer;
    driver_pushqv                : pointer;
    add_driver_entry             : pointer;
    remove_driver_entry          : pointer;
    driver_mk_atom               : pointer;
    driver_mk_port               : pointer;
    driver_connected             : pointer;
    driver_caller                : pointer;
    driver_mk_term_nil           : pointer;
    driver_output_term           : pointer;
    driver_send_term             : pointer;
    driver_async                 : pointer;
    driver_async_cancel          : pointer;
    driver_lock_driver           : pointer;
    driver_dl_open               : pointer;
    driver_dl_sym                : pointer;
    driver_dl_close              : pointer;
    driver_dl_error              : pointer;
    erts_alc_test                : pointer;
    driver_binary_get_refc       : pointer;
    driver_binary_inc_refc       : pointer;
    driver_binary_dec_refc       : pointer;
    driver_pdl_create            : pointer;
    driver_pdl_lock              : pointer;
    driver_pdl_unlock            : pointer;
    driver_pdl_get_refc          : pointer;
    driver_pdl_inc_refc          : pointer;
    driver_pdl_dec_refc          : pointer;
    driver_system_info           : pointer;
    driver_get_now               : pointer;
    driver_monitor_process       : pointer;
    driver_demonitor_process     : pointer;
    driver_get_monitored_process : pointer;
    driver_compare_monitors      : pointer;
    erl_drv_mutex_create         : pointer;
    erl_drv_mutex_destroy        : pointer;
    erl_drv_mutex_trylock        : pointer;
    erl_drv_mutex_lock           : pointer;
    erl_drv_mutex_unlock         : pointer;
    erl_drv_cond_create          : pointer;
    erl_drv_cond_destroy         : pointer;
    erl_drv_cond_signal          : pointer;
    erl_drv_cond_broadcast       : pointer;
    erl_drv_cond_wait            : pointer;
    erl_drv_rwlock_create        : pointer;
    erl_drv_rwlock_destroy       : pointer;
    erl_drv_rwlock_tryrlock      : pointer;
    erl_drv_rwlock_rlock         : pointer;
    erl_drv_rwlock_runlock       : pointer;
    erl_drv_rwlock_tryrwlock     : pointer;
    erl_drv_rwlock_rwlock        : pointer;
    erl_drv_rwlock_rwunlock      : pointer;
    erl_drv_tsd_key_create       : pointer;
    erl_drv_tsd_key_destroy      : pointer;
    erl_drv_tsd_set              : pointer;
    erl_drv_tsd_get              : pointer;
    erl_drv_thread_opts_create   : pointer;
    erl_drv_thread_opts_destroy  : pointer;
    erl_drv_thread_create        : pointer;
    erl_drv_thread_self          : pointer;
    erl_drv_equal_tids           : pointer;
    erl_drv_thread_exit          : pointer;
    erl_drv_thread_join          : pointer;
    erl_drv_putenv               : pointer;
    erl_drv_getenv               : pointer;
  end;

procedure get_cllback_entries(callbacks: PWinDynDriverCallbacks);
begin
  @driver_select                :=  callbacks.driver_select                ;
  @driver_event                 :=  callbacks.driver_event                 ;
  @driver_output                :=  callbacks.driver_output                ;
  @driver_output2               :=  callbacks.driver_output2               ;
  @driver_output_binary         :=  callbacks.driver_output_binary         ;
  @driver_outputv               :=  callbacks.driver_outputv               ;
  @driver_vec_to_buf            :=  callbacks.driver_vec_to_buf            ;
  @driver_set_timer             :=  callbacks.driver_set_timer             ;
  @driver_cancel_timer          :=  callbacks.driver_cancel_timer          ;
  @driver_read_timer            :=  callbacks.driver_read_timer            ;
  @erl_errno_id                 :=  callbacks.erl_errno_id                 ;
  @driver_failure_eof           :=  callbacks.driver_failure_eof           ;
  @driver_failure_atom          :=  callbacks.driver_failure_atom          ;
  @driver_failure_posix         :=  callbacks.driver_failure_posix         ;
  @driver_failure               :=  callbacks.driver_failure               ;
  @driver_exit                  :=  callbacks.driver_exit                  ;
  @driver_pdl_create            :=  callbacks.driver_pdl_create            ;
  @driver_pdl_lock              :=  callbacks.driver_pdl_lock              ;
  @driver_pdl_unlock            :=  callbacks.driver_pdl_unlock            ;
  @driver_pdl_get_refc          :=  callbacks.driver_pdl_get_refc          ;
  @driver_pdl_inc_refc          :=  callbacks.driver_pdl_inc_refc          ;
  @driver_pdl_dec_refc          :=  callbacks.driver_pdl_dec_refc          ;
  @driver_monitor_process       :=  callbacks.driver_monitor_process       ;
  @driver_demonitor_process     :=  callbacks.driver_demonitor_process     ;
  @driver_get_monitored_process :=  callbacks.driver_get_monitored_process ;
  @driver_compare_monitors      :=  callbacks.driver_compare_monitors      ;
  @set_busy_port                :=  callbacks.set_busy_port                ;
  @set_port_control_flags       :=  callbacks.set_port_control_flags       ;
  @get_port_flags               :=  callbacks.get_port_flags               ;
  @driver_alloc_binary          :=  callbacks.driver_alloc_binary          ;
  @driver_realloc_binary        :=  callbacks.driver_realloc_binary        ;
  @driver_free_binary           :=  callbacks.driver_free_binary           ;
  @driver_binary_get_refc       :=  callbacks.driver_binary_get_refc       ;
  @driver_binary_inc_refc       :=  callbacks.driver_binary_inc_refc       ;
  @driver_binary_dec_refc       :=  callbacks.driver_binary_dec_refc       ;
  @driver_alloc                 :=  callbacks.driver_alloc                 ;
  @driver_realloc               :=  callbacks.driver_realloc               ;
  @driver_free                  :=  callbacks.driver_free                  ;
  @driver_enq                   :=  callbacks.driver_enq                   ;
  @driver_pushq                 :=  callbacks.driver_pushq                 ;
  @driver_deq                   :=  callbacks.driver_deq                   ;
  @driver_sizeq                 :=  callbacks.driver_sizeq                 ;
  @driver_enq_bin               :=  callbacks.driver_enq_bin               ;
  @driver_pushq_bin             :=  callbacks.driver_pushq_bin             ;
  @driver_peekqv                :=  callbacks.driver_peekqv                ;
  @driver_peekq                 :=  callbacks.driver_peekq                 ;
  @driver_enqv                  :=  callbacks.driver_enqv                  ;
  @driver_pushqv                :=  callbacks.driver_pushqv                ;
  @add_driver_entry             :=  callbacks.add_driver_entry             ;
  @remove_driver_entry          :=  callbacks.remove_driver_entry          ;
  @driver_system_info           :=  callbacks.driver_system_info           ;
  @erl_drv_mutex_create         :=  callbacks.erl_drv_mutex_create         ;
  @erl_drv_mutex_destroy        :=  callbacks.erl_drv_mutex_destroy        ;
  @erl_drv_mutex_trylock        :=  callbacks.erl_drv_mutex_trylock        ;
  @erl_drv_mutex_lock           :=  callbacks.erl_drv_mutex_lock           ;
  @erl_drv_mutex_unlock         :=  callbacks.erl_drv_mutex_unlock         ;
  @erl_drv_cond_create          :=  callbacks.erl_drv_cond_create          ;
  @erl_drv_cond_destroy         :=  callbacks.erl_drv_cond_destroy         ;
  @erl_drv_cond_signal          :=  callbacks.erl_drv_cond_signal          ;
  @erl_drv_cond_broadcast       :=  callbacks.erl_drv_cond_broadcast       ;
  @erl_drv_cond_wait            :=  callbacks.erl_drv_cond_wait            ;
  @erl_drv_rwlock_create        :=  callbacks.erl_drv_rwlock_create        ;
  @erl_drv_rwlock_destroy       :=  callbacks.erl_drv_rwlock_destroy       ;
  @erl_drv_rwlock_tryrlock      :=  callbacks.erl_drv_rwlock_tryrlock      ;
  @erl_drv_rwlock_rlock         :=  callbacks.erl_drv_rwlock_rlock         ;
  @erl_drv_rwlock_runlock       :=  callbacks.erl_drv_rwlock_runlock       ;
  @erl_drv_rwlock_tryrwlock     :=  callbacks.erl_drv_rwlock_tryrwlock     ;
  @erl_drv_rwlock_rwlock        :=  callbacks.erl_drv_rwlock_rwlock        ;
  @erl_drv_rwlock_rwunlock      :=  callbacks.erl_drv_rwlock_rwunlock      ;
  @erl_drv_tsd_key_create       :=  callbacks.erl_drv_tsd_key_create       ;
  @erl_drv_tsd_key_destroy      :=  callbacks.erl_drv_tsd_key_destroy      ;
  @erl_drv_tsd_set              :=  callbacks.erl_drv_tsd_set              ;
  @erl_drv_tsd_get              :=  callbacks.erl_drv_tsd_get              ;
  @erl_drv_thread_opts_create   :=  callbacks.erl_drv_thread_opts_create   ;
  @erl_drv_thread_opts_destroy  :=  callbacks.erl_drv_thread_opts_destroy  ;
  @erl_drv_thread_create        :=  callbacks.erl_drv_thread_create        ;
  @erl_drv_thread_self          :=  callbacks.erl_drv_thread_self          ;
  @erl_drv_equal_tids           :=  callbacks.erl_drv_equal_tids           ;
  @erl_drv_thread_exit          :=  callbacks.erl_drv_thread_exit          ;
  @erl_drv_thread_join          :=  callbacks.erl_drv_thread_join          ;
  @null_func                    :=  callbacks.null_func                    ;
  @driver_async                 :=  callbacks.driver_async                 ;
  @driver_async_cancel          :=  callbacks.driver_async_cancel          ;
  @driver_caller                :=  callbacks.driver_caller                ;
  @driver_connected             :=  callbacks.driver_connected             ;
  @driver_dl_close              :=  callbacks.driver_dl_close              ;
  @driver_dl_error              :=  callbacks.driver_dl_error              ;
  @driver_dl_open               :=  callbacks.driver_dl_open               ;
  @driver_dl_sym                :=  callbacks.driver_dl_sym                ;
  @driver_get_now               :=  callbacks.driver_get_now               ;
  @driver_lock_driver           :=  callbacks.driver_lock_driver           ;
  @driver_mk_atom               :=  callbacks.driver_mk_atom               ;
  @driver_mk_port               :=  callbacks.driver_mk_port               ;
  @driver_mk_term_nil           :=  callbacks.driver_mk_term_nil           ;
  @driver_output_term           :=  callbacks.driver_output_term           ;
  @driver_send_term             :=  callbacks.driver_send_term             ;
  @erl_drv_getenv               :=  callbacks.erl_drv_getenv               ;
  @erl_drv_putenv               :=  callbacks.erl_drv_putenv               ;
end;
